/*
 * Malla.h
 *
 *  Created on: 10/08/2013
 *      Author: jose
 */

#ifndef MALLA_H_
#define MALLA_H_

#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_sparse.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <iostream>


using namespace boost::numeric::ublas;

class Malla {
public:
	Malla(int i, int j, double x1, double x2, double y1, double y2);
	Malla();
//	~Malla();
	void fijar_frontera(int i,int j);
	void fijar_variable(int i,int j);
//	void condfront_imagen();
	double V(int i,int j);
	double R(int i, int j);
	double E(int i, int j);
	bool D(int i,int j);
	void Set_V(int i,int j,double c);
	void Set_R(int i, int j,double c);
	void Set_E(int i, int j,double c);
	void resize(int i,int j, double x1, double x2, double y1, double y2);
	int Size_i();
	int Size_j();
	double Hx();
	double Hy();
	int Nivel();
	void SetNivel(int i, int n);
	int N_mallas();
private:
	int nivel;
	int n_mallas;
	int size[2];
	double hx;
	double hy;
	matrix<double> v;
	matrix<double> r;
	matrix<double> e;
	compressed_matrix<bool> d;
};

#endif /* MALLA_H_ */
